<!--
 * @Author: your name
 * @Date: 2021-06-28 08:50:11
 * @LastEditTime: 2021-06-28 11:05:07
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \vue-app\src\views\About.vue
-->
<template>
  <div>
    <input type="text" v-model="val" /><br />
    <input type="text" v-model="vals" /><br>
    <button @click="btn()">登录</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      val: "",
      vals: "",
    };
  },

  methods:{
    btn(){
      console.log(this.val,this.vals);
      if(this.val==="123")
      {alert("登陆成功")
        this.$router.push("/home")
        
      }else{
        alert("登陆失败")
      }
    }
  }
};
</script>

<style>
</style>